import axios from "axios";

export default (() => {
    return axios.get('serverConfig.json').then(res => {
        if (process.env.NODE_ENV === 'production') {
            res.data.ApiUrl = `${window.location.origin}/${res.data.ApiUrl}`;
        } else {
            return res;
        }
        try {
            return res;
        } catch (e) {
            Promise.reject(e);
        }
    });
})();
